package com.infolab.aims.domain.asset;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.infolab.aims.common.SpecialToStringStyle;
import com.infolab.aims.common.bean.AbstractModelBean;

@Entity
@Table(name = "AMTB_ISSUE_ORDER_DETAIL")
public class AssetIssueOrderDetail extends AbstractModelBean implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer issueOrderDetailId;
	@ManyToOne
	@JoinColumn(name = "issueOrderId")
	private AssetTransaction assetTransaction;

	private Float unitPrice;

	private Integer quantity;

	public String getAuditContentHead() {

		return new ToStringBuilder(this, SpecialToStringStyle.SPECIAL_STYLE).append("Issue Order Id",
				assetTransaction.getAssetTransactionCode()).toString();
	}

	public String getAuditContentDetail() {
		return super.getAuditContentDetail();
	}

	public String getAuditCode() {
		return super.getAuditCode();
	}

	public Integer getIssueOrderDetailId() {
		return issueOrderDetailId;
	}

	public void setIssueOrderDetailId(Integer issueOrderDetailId) {
		this.issueOrderDetailId = issueOrderDetailId;
	}

	public Float getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Float unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public AssetTransaction getAssetTransaction() {
		return assetTransaction;
	}

	public void setAssetTransaction(AssetTransaction assetTransaction) {
		this.assetTransaction = assetTransaction;
	}

}
